let express = require("express");
let router = express.Router();
let HistoryData = require("../mock/deviceHistory");

router.get("/data3", (req, res) => {
  // Add logic here to modify data based on isError
  const modifiedData = HistoryData.chartData.map(event => ({
    ...event,
    isError: event.isError // This could be more complex logic based on your requirements
  }));
  res.send({ msg: "设备用电", chartData3: { chartData: modifiedData } });
});

module.exports = router;